import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Solution {
    // 涉及数组和要想到这种双指针的方法
    public int[][] findContinuousSequence(int target) {
        List<int[]> list = new ArrayList<>();
        for (int l = 1, r = 2; l < r;) {
            int count = r - l + 1;
            int sum = (l + r) * count / 2;
            if (sum  == target) {
                int[] temp = new int[count];
                for (int i = 0; i < count; i++) {
                    temp[i] = l + i;

                }
                list.add(temp);
                l++;

            } else if (sum < target) {
                r++;
            } else {
                l++;
            }
        }
        return list.toArray(new int[list.size()][]);
    }
}

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int target = sc.nextInt();
        System.out.println(Arrays.deepToString(new Solution().findContinuousSequence(target)));
    }
}